package tmp {
	import flash.text.TextFieldAutoSize;	
	import flash.display.Sprite;
	import flash.text.TextField;		

	/**
	 * @author tamt
	 */
	public class MenuBtn extends Sprite {
		public static const W : Number = 40;
		public static const H : Number = 40;
		
		public var tScale:Number = 1;

		public function MenuBtn(label : String = 'menu') {
			this.graphics.lineStyle(1, 0x000000);
			this.graphics.beginFill(0x99cc00);
			this.graphics.drawRect(0, 0, 40, 40);
			this.graphics.endFill();
			
			var tf : TextField = new TextField();
			tf.autoSize = TextFieldAutoSize.LEFT;
			tf.text = label;
			tf.x = W / 2 - tf.width / 2;
			tf.y = H / 2 - tf.height / 2;
			tf.mouseEnabled = false;
			addChild(tf);
		}
	}
}
